package com.wangp.springbootsource.event;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * <pre>
 * classname WeatherRunListener
 * description
 * </pre>
 *
 * @author wangp
 * @date 2020/9/3 21:46
 **/
@Component
public class WeatherRunListener {

    @Autowired
    private WeatherEventMulticaster weatherEventMulticaster;

    public void snow() {
        weatherEventMulticaster.multicast(new SnowEvent());
    }

    public void rain() {
        weatherEventMulticaster.multicast(new RainEvent());
    }
}
